package lesson5;

import java.util.Scanner;

//输入三个整数x,y,z，请把这三个数由小到大输出。
public class Demo3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个整数...");
        int num1 = scanner.nextInt();
        System.out.println("请输入第二个整数...");
        int num2 = scanner.nextInt();
        System.out.println("请输入第三个整数...");
        int num3 = scanner.nextInt();
        System.out.println(num1);
        System.out.println(num2);
        System.out.println(num3);

        int max = 0;
        int middle = 0;
        int min = 0;
        //此处查出num1和num2的最大值
        max = num1>num2?num1:num2;
        max = max>num3?max:num3;

        min = num1<num2?num1:num2;
        min = min<num3?min:num3;
        System.out.println(min);
        System.out.println(num1+num2+num3-max-min);
        System.out.println(max);

    }
}
